# -*- coding: utf-8 -*-

import pandas as pd
from tasks import start_test
from info import phone


def write_execl():
    data_list = start_test.exchange()
    phone_info = phone.get_phone_info()
    if len(data_list) == 0:
        data_list = []

    result_csv = pd.DataFrame(data=data_list)
    result_csv.to_csv('../result/result.csv')


# 手机基本信息写入表格
def record_phone_info():
    phone_info = phone.get_phone_info()
    result_csv = pd.Series(phone_info, index=['model', 'brand', 'pix', 'api', 'cpu_kel_num', 'devices_num', 'version'])
    result_csv.to_csv('../result/result.csv')
